package wikichat.android.intelimed;

import android.app.Activity;
import android.content.Intent;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class WIKICHATActivity extends Activity {
	
	Intent intent;
	
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
	}

	public boolean onCreateOptionsMenu(Menu menu) {
		super.onCreateOptionsMenu(menu);
		MenuInflater inflater = getMenuInflater();
		inflater.inflate(R.menu.menu, menu);
		return true;
	}

	public boolean onOptionsItemSelected(MenuItem item) {
		switch (item.getItemId()) {
		case R.id.wiki:
			setContentView(R.layout.wikipage);
			intent = new Intent(this, WikiActivity.class);
			intent.putExtra("text", "Wiki");
			startActivity(intent);
			break;
		case R.id.chat:
			setContentView(R.layout.chatpage);
			intent = new Intent(this, ChatActivity.class);
			intent.putExtra("text", "Chat");
			startActivity(intent);
			break;
		}
		return true;
	}

}